Fixed problem where files weren't being closed.
Now ignores .todo, *.pyc and *.so files.