Adding configuration to packgen

Added the ability to specify a config file for packgen. Fixes for packgen on Windows.