Fixed file and directory creation.