Fix bug where the actual Makefile is treated as directory.