Add the current directory also to the includes

Also move submodules searching into the function that makes the compile
command.