Implement createDirectoryIfNeeded for POSIX systems
Do not mandate post "." when specifying extension