fix local file rewriting

not exactly sure what the test case is for this…
fix destination option
1.1.1