Fixed --keepflags bug in create_makefile.py