chmod support

Add chmod() support.