Cleaned up code and added prelim zip file support

I've cleaned up the code in the ways I emailed you about. I also added preliminary zip file support and fixed the code to allow relative paths.

I think the next stage is to change the code to use python file manipulation methods and to start using the python subprocess module to handle external processes.