Last fix for the import problem.
Attempt at adding support for the 'full' border mode.
Add some tests (that all fail due to shape errors at the moment).