Improvement to parsing of package file name

Improvement to parsing of package file name to work with version numbers that aren't exactly three (i.e. 2.4.1.0 and 2.1). Previous version had a magic number of "-4" used with substr function.