Moved the argument parsing code down, added support for optparse.

Changed the --config short argument from -c to -f.

Unless bugs are found this will be the final version. Next step will be to do the same script using psphere. :)