Fragment handling in data-uri function 1959

The change removes #fragment from filePath before readig the file and adds
it back to the end of the generated uri.
Merge pull request #2136 from SomMeri/data-uri-1959

Fragment handling in data-uri function 1959