escape space based strings
move git repo handler to beginning of script for cloning handling