Manage temporary files properly.
Replace total_seconds for Python 2.6.x
Merge pull request #7 from aplanas/master

Fix tmp file. Fix total_seconds (Python 2.6.x)