Fix some error cases to raise Net::SCP::Error instead of RuntimeError, add tests