Only append hash extension if there is a hash

When setting `hashSize` to 0, the filename created was of the format

```
head..css
```

(double full-stops)

This PR only appends the hash if it exists, creating more sensible filenames, e.g.

```
head.css
```