#640 - Fix VSM for package repository materials

1. Allow dots in a segment in a rails route. This is mentioned at the end of the ["Dynamic Segments" section](http://guides.rubyonrails.org/routing.html#dynamic-segments) in  the Rails routing guide. However, in this case, along with that, we needed to allow an optional format. So, regex lookahead helps. See [this](http://stackoverflow.com/a/7601669).

2. Small change to allow material name to not be available, for the case of a package material plugin removed from the server.