Make merge.py invokable from another script

Until now this script has been used at the command line. Tuskar would like
to consume the merge.py functionality to generate the overcloud heat stack
template. A main() is thus added here as well as a few related nits like
ensuring paths are absolute for included files. The actual merge
functionality is split into its own method so it can be invoked more
cleanly from calling scripts. The main method is then used at the command
line as before

For more info about how this will all be used by Tuskar see
I578b4e9f238590ea245b827bc75d252568d194fe

Change-Id: Ia6b6416fe10358d23f2b120283eecaf4c1178cfd