Fixed bug with overridden serialization context and with tests which started in vendor directory

Should fix the #691 ticket =)