add support for detach flag
update tests
add bool validation
Merge pull request #153 from ves/detachflag

Add support for the --detach flag