Better relative path handling; write command