Validate a filename in python,"return os.path.join(directory, filename)"