Ticket #3040: (check_file_access): fix file descriptor leak.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Merge branch '3040_mcedit_fd_leak'

* 3040_mcedit_fd_leak:
  Ticket #3040: (check_file_access): fix file descriptor leak.
Merge branch 'master' into with-3032_panelize_reload_fix

* master:
  Ticket #3040: (check_file_access): fix file descriptor leak.

6c5cb2f2-edf1-11e2-97be-0800274013ad