Item12359: Typo in the unlock

The file handle was deleted before close.   Also, there was a missing
"use AggregateIterator" which was causing a compile error with the @ISA.

TimotheLitt spotted the issues.

git-svn-id: http://svn.foswiki.org/trunk/core@16434 0b4bb1d4-4e5a-0410-9cc4-b2b747904278