Validate lib names more correctly

Now that modifiers are possible, a lib called `.Foo` would be accepted
under the old try: parse/catch ParseError scheme. The lib name format is
simple enough to just use a regex.