Utilities: fixed a permission issue in the 'createDirectory' function.

The created directory could not be used as its eXecutable flag was not
set properly.
main: fixed issues related to directory names.