Removed modification of config object and added test for overriding basedir config.