Depending on baggage collection the airport shuttle bus is pretty reliable and on a saturday night 15-20 mis is probably fair from EDI to Haymarket. If you find yourself tight for time a cab would be a safer bet although these can be a bit thin on the ground at the airport on a saturday during the festival!
If you are catching the 2313 it will be heading right past the airport ! It stops at South Gyle - and also at Dalmeny. A cab to south Gyle would take around 10 minutes from the airport.
National Rail Enquiries - Local Area Map for South Gyle