Additional validation for container volumes and ports.


* Resolves #260 - Support ro mode for volumes
* Resolves #301 - Support `~` for home directors
* Fixes a bug with `get_tty_width()` (needs to be an int, not a string, it's an error in python3, and does the wrong thing in python2)
* add to docs about using ro/rw with volumes

This list-fiddling stuff is really confusing. Could we bring back the local variables, so I can see what's being returned in each case?