Bug fixes of port and new tests.

port.coffee

Fixed bug where number strings were not being recognised leading
to row() never being called.

Fixed bug where callback after apply() was never called.

Fixed bug where admins could not modify restricted tables.

Plus a number of new tests.