made some changes to plugin export for Linux
sorted a few bugs Iain reported..