Port latest batch of cukes from master to gh

:warning: This is my work in progress; some cukes still fail

/cc @jingweno
We need to close the file here after use: `file.Close()`.