added missing -lpthread for some systems
added missing fclose in error handling case (patch from Vaio)
fixed memory leak/missing fclose. Patch from Vaio
removed unused ftfilemapper class