Use numpy, and fix mkdir