Use setfacl for proper permissions setting

With chmod and extended ACLs some permissions were broken. Changing the chmod
to setfacl allows more granular control of all permissions, including the
mask set on files