Fixed bug with creating empty directories.