add chmod (issue #4)

see issue #4