bug fixes in code to generate UNIX scripts