Avoid throwing when checking for disk space, fixes #2039