Fixing possible exception when run from mapped drive, or network share.