Use os.path.relpath instead of custom function