Fixed bug causing slow unbuffered responses

JSON responses were being returned character by character instead of as a whole string. This especially caused problems when pico was proxied behind Apache.