Sane file and directory default permissions

Ticket: #5314