resolve path before creating directory (#516)