Fixed a bug in where the mutex in cal3d loader wouldn't get unlocked if file pointer was invalid