Update test tasks

Remove the Gemfile.lock file before and after running the tests.
If the previous test fails then the Gemfile.lock file may still exist.