Changed gphoto to use popen and monitor line-by-line output. NOT TESTED