Custom PHP not being picked up
The SagePay extension from Circle is outdated and is not supported for 5.x version. Mattwire has integrated sagepay payment processor in Eileen's CiviCRM OmniPay Multiprocessor extension. The simplest, easy and recommended solution would be to install the omnipay extension from Matt's git repository(sagepay branch). Move old payment processor from all Contribution and event pages to new sagepay payment processor either by running sql or updating manually. 

HTH

Pradeep