Restrict permissions and add .txt files extension (configurable)

Resolves #76
Ref #69