Added dist and docdist targets
Fixed permissions