phonegap's file api is bad