fork of http://github.com/fcoury/jfilehelpers