Improve error handling in helper module interface

* Return a dict of strings instead of a concatenated string in
  check_cmd()
* Return an exception object instead of a string in cd()
Improve removal of appliance logs

Only remove specific logs.
Make factory setup script more robust
[WIP] Add module used to create actual AMIs