Add unit tests for config directory fix
Move null check to top of config directory parsing so that it will take care
of Windows systems as well