The Dark Blues were beaten 2-1 at Motherwell to move to within a result of bottom side St Johnstone.