Cleaned up the cleanfile.py after some good suggestions by Chris.