Train direction and connection check fixes to allow cart splitting to work

Signed-off-by: Irmo van den Berge <bergerkiller@gmail.com>