daemon: Move statvfs code into separate file.