Direct disk access is impossible on environments where components run in
their own container. There for constructing the path should not be done
except for exceptional cases.
One of the considerations, instead of logging, was to use Sentry. For
now I've chosen not to use this as the impact of this change is hard to
determine. Getting this in now will allow us to checkout the impact on
dev.gitlab.org and staging.