Adding command-line TAB completion for command names and GUIDs (osx/linux)

Now that the commands have been restructured it was easy to add tab completion for commands and for arguments. At the moment it is only the GUID that is completed, but there is no reason why all other arguments could not be completed.

I have only tested this on osx, so if someone could test it on linux that would be great.

I've also added the ability to set the logging level from the command line so that debug messages can be seen from the moment the program starts.