Fix segfault on path handle delete