Make TurnKey build process work without root login.

Setup the FAB_* environment variables like in /root/.bashrc on the
TurnKey Dev appliance. Also make sure the work directories exist.
Wait for devices to appear in build_ami_from_rootfs
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