Move the generating empty deps stuff into fastgen.sh. The .deps files are only used by Makefiles which are created by fastgen.sh, so fastgen is the natural place to create them. The "portable dirname" regex has been changed to remove any number of trailing slashes. Just in case. :)