Add replace (PUT) support

Maybe comment why this is necessary.