Close file handles; Python 3 support
Remove useless interp function

Turns out dropping into the interpreter inside a function like this only
gives you the context of the function, not the main program.