Using os.path to determine file basename