add script to test http example
if input files specified don't try to read from stdin
fix bug in array.slice