Use native method instead of shelling out
Fix typo in comment