Fix issue #2

Due to wrong order of execution, the name was set too late
for the permissions string to take effect.