Bug fixes

Fixed bugs that remote loading introduced to exe/dll loading. Starting
to get rid of Invoke-Win32 function.