Maint: Fix intermittently failing spec test
The spec test was only failing in the jenkins environment due to the
File.open stub interferring with the file cleanup routines. This commit
changes the test to raise on the readlock method instead, which
restricts its affect to just that example.