Updated gemspec, improved error message and updated relevant tests