Make installing kernels more robust

Signed-off-by: Sandon Van Ness <sandon@inktank.com>
Was just trying to do house-keeping. Wasn't sure if it was good to leave these around with never closing them. Not super familiar with StringIO to be honest.