platform independent network file sending (complete rewrite of jlansend)