handle extensions dir creation for both types of root dir
default mode to 0777