fixed bug where gif not working with absolute paths including ~ character