write_graphite plugin: Don't call close() on invalid file descriptors.