Pass regex groups down to script as params

Very initial implementation, closes #8.