Deal with filenames being object

Some time recently CDNJS changed so some libraries have their filenames
represented as objects with a `name` property, and others just have
`filename` as a string.
Change code style to suit @phuu :)
Merge pull request #2 from jackfranklin/filename-not-always-string

Deal with filenames being object