Fixed open file from pickle.load()

This fixes an unclosed file resource warning that occurs when using this script.