Use shellwords to build command text
Add parameter to convert the UUID to uppercase

Cleaned up some style issues too.