fix dest filepath rewriting