Fix dist directory structure for plugins

Resolves PICARD-600
Fix bug picked up by Travis
Improve code and add top-level sort
Add back deleted blank line
Merge pull request #310 from Sophist-UK/sophist_fix_plugin_file_selections

PICARD-600: Fix dist directory structure for plugins