Move flag registration to its own function.

Also add version check to travis build.

Affected issues:
	surtrstudios/weyland#4
Add check for existence of the build file.

Affected issues:
	surtrstudios/weyland#4