Allow customisation of the distribution plugin

Test coverage
Allow distributions to be installed
Generate a TAR distribution
Fix merge problem.
Merged pull request 129: Allow customisation of the distribution plugin
Some test fixes post merge.