Update safeguard.c

Fixed some bugs - namely false positives, was freeing the fileptr in mapSignatures() before returning it.
Further, fixed windows implementation. Will now compile in Visual Studio 2010.