Fix replacer inserting the dir in non-file buffers
Fixes issue #45

For real this time