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. Fixes #1959