Replaced poor substring method with preg_match based method

New version works with version numbers that aren't exactly three (a la
2.4.1.0 and 2.1).
Re-enabled HTML/CSS generation functions.
Merge pull request #1 from onepica/master

Improvement to parsing of package file name