Basic command arguments, plus win32 patch

These two commits add a simple patch to allow compiling under win32 system ( I know this is not needed but it doesn't harm ) and the support for basic command line parameters.

As commented in the commit this system is very basic but should suffice our needs.