Automatically create parent directories in atomic_lock class