1.3.1: Attachment encoding fixes, cleanup ...

Changed encode in favor of encodeURIComponent.
Changed server point of origin (/ instead of /ping).
Rewrote server piping to remove reliance on express/request.