Fixes 40dda7383b which inadvertently installed to a file as the directory didn't exist. Also blocked up the postInstall script for readability.
40dda7383b