Powershell Wait For File To Unlock, If I run the script manually from powershell, it works like a charm.