refactor remote.php, renamed to 'dav'