Handle creation of non existing parent directories. Improve exception message.