Add interleave function from ascii package, with little changes