Use folder name for %sourceName% if package.json isn't available
Add execWrap() function to simplify output and error handling