Ported the mac changes to Ubuntu

It is also worth noting that folders cannot contain spaces because of StochKit build

Perhaps should build StochKit in /tmp?