Fix checking the init script in check.rake

Fixes #2671