a bunch of changes related to determining type_tag automatically; also marking 'pe' files as 'exe' now