make octal more idiomatic

* Improve the test to expect errors for invalid input.
* Improved the example file and changed it to pass the new tests