A new study has shown that swearing enabled people to perform better in a task that tested the strength of their grip in opening a jam jar.