fix writer bug on phonegap
better fileutils lib