Merge pull request #11681 from UtahDave/develop

add another missing import
We never use pickles

and they have not been supported since around salt 0.8.2, so we might as
well take them out.
Close file handle before returning

Not closing the file handle here was causing Salt to keep a lock on the
file on Windows minions since the minion thread is long-lived.