identifyPackageType function

Identifies the package type from a filename