Use the external command factory for the script generator.
Fix test to work with newer version of git also