Replacing os.sep constructs with os.path.join