Use stdlib methods to replace most non-git shell calls