COMP: Fix [-Wconversion-null] in qSlicerScriptedFileWriter.cxx

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22562 3bd1e089-480b-0410-8dfb-8563597acbee
BUG: Fix qSlicerUtilsTest1

Following Qt 4.8.1, setting permission on a folder with a parent folder
not being executable leads to an error.

As it should always have:

$ mkdir bar/foo
$ chmod u-x bar
$ chmod u-x bar/foo
chmod: cannot access ‘bar/foo’: Permission denied

This commit implement the correct behavior by setting flags in the
right order depending if Executable but is passed or not.

Since it is not possible to change permission of directory without executable
bit set to off, if flag "with executable bit off" is recursively set to
path /a/b/c/d, permission should be set to d, c, b and then a.

[1] and probably 4.8.0 but this hasn't been tested.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22563 3bd1e089-480b-0410-8dfb-8563597acbee