use writefile instead of extenal echo call

dash's builtin echo does not support '-e'
Merge branch 'master' into neocomplcache