Add support for custom headers (Python 3 only for now); unique file names in cached directory