COMMON: Add FilePath::getDirectory()

Return a path's directory.
Example: "/path/to/file.ext" -> "/path/to/"
COMMON: Only create the log path when the log is opened
COMMON: Only create the config path when the config is written