Fix file download path generation