Prevent aliases from overwriting the original file

See #1547

I also changed the behavior for symlinks so a link will get created and be relative.