Fixed a bug, where the makefile was generated inside the current dir.