Add integration test (disabled) for file->dir and dir->file replacement (ref #580)