INST: check permission in dirname
INST: check permission in dirname

Former-commit-id: 49648385971f477cbedfa91792d420b739cb0570 [formerly 879c3a4683efe5936866659089a4c89e8cafe47f]
Former-commit-id: 18ae9530d97458e52e5c4ab3ac2ee54f6755242d
Former-commit-id: 2cf0207ad1f63750e0e82b25a7c5f91269ee79bb
neuropoly/spinalcordtoolbox,neuropoly/spinalcordtoolbox,neuropoly/spinalcordtoolbox,neuropoly/spinalcordtoolbox,neuropoly/spinalcordtoolbox,neuropoly/spinalcordtoolbox,neuropoly/spinalcordtoolbox