Add addt'l tpk image type detection

Fixes #222

Also adds enhancements to how TPK files are parsed to memory. Improved the flow with deferreds.