Leicester edge Bath for final spot