Add support for 12.04 and fix some permission related problems