export.py: binary + directory traversal

Would be glad if you could test whether it fixes the broken PNGs on windows (#12) and whether it was possible for evil modpaks to write files into ancestor directories.