Fix dirpath shell script generated from makefile