A motorist who was caught driving dangerously while already banned from the roads has been given a suspended prison sentence.