move tests to spec dir, include helper
new lib class, move downloadto function