chmod and chown bugs
chmod chown bugs rectified; merging branch