Call io.dir and io.write defaults as early as possible

- Tests for:
  - Initialization
  - Analog read
  - Digital read
  - Digital write
v0.3.7