Final fixes to config tests

Previous mocking of the whole os.path module replaced with mocking for
individual method mocking. Without this, unforseen calls to os.path functions
return mock results, which then behave incorrectly.