Move some common code up into base posix class