Replace "rm -f" with "os.remove".