```os.path.normpath``` might be useful here.