move middleman setup code into software library

Changes to be committed:

	modified:   includes/software.lib
	modified:   scripts/middleman.sh