Apply an html_decode operation after calling htmlentities.

- Otherwise we may introduce weird symbols in file names, such as '&amp;' instead of regular &.