Fixes directory creation