Win32 issue when phantomjs is already installed

Fixed writeLocationFile() so that all code paths escape the path on
win32 properly