Fixed gitignore creation and ignored flags directory.