Update putfile.py

Cleaned up "main()".