CRM-15365 Directory Paths Not Saving Correctly on Windows Servers

Changes to the core code to fix issues with changing the directory pointers in the UI on Windows Servers.