current-filesystem(): accomodate NetBSD and SunOS.

Thanks to Thomas Klausner <tk@giga.or.at> for reporting the problem,
and providing the alternate commands.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>