Modified run script so it can handle whitespaces in output dir