Bug 977373 - Fix DeviceStorage file handle leak. r=mikeh, a=fabrice