Fixed #23436 -- Made BASE_DIR absolute in settings template.

This ensures consistency between Python 3.4+ and earlier versions.

Thanks Harry Percival for the report.