optimize getFile function

https://github.com/nightsh/kcfinder/commit/d2d2f41d30fad47bc00675f1b7a814de9db321e4