net/tap: fix file close on remove