getName always returns same md5 value if "name" attribute not set

Related to #146
When name attribute is not set (case of JS files), getName always returned the same md5 value. This is because array_values($assetSettings) always returned an empty value.
Furthermore i corrected the test on the name attribute as for #145.