more bugfixes to pw.js. Stream output from gpg to file (fixes not writing correctly - probably due to binary/text mode)