patch symfony fclose -> close dir (refers ticket #884)