Added argument parsing and checking to jim.py

Also copied minification function from wam