Unit test tempfile - add more test cases

The two commits in this PR originates as a followup to issue #1432. I wanted to add a test case or two to detect the issue. In the act of doing this, I realize a few more test cases of a similar nature could be added. Also, I added a test to directly verify temp directory deletion.

The new test cases are mostly concerned with testing two successive calls of gettempdir or tempname, and when the calls are interrupted by deleting the temp directory, or by doing the other operation. For example,

1. gettempdir, gettempdir
2. gettempdir, deltempdir, gettempdir - 'internally' delete temp directory
3. gettempdir, lfs.rmdir, gettempdir - 'externally' delete temp directory
4. gettempdir, tempname, gettempdir

Test case 1 appears in the original unit test, which is a check for idempotency.
Test case 4 checks for any side effects between gettempdir and tempname.
Test case 3 checks for #1432 and is to be compared with test case 2. Test case 3 is written to succeed, although it should more naturally fail, if it wasn't for the performance hit that will occur (see comments in #1432).

A similar test sequence is repeated for tempname.

Roughly speaking, the first commit re-expresses the original unit test with shortcut aliases so there is less verbosity. The first commit also merges two of the test cases into one. The second commit adds the extra test cases.
If I've got my regex right, this function checks that the path begins with `dir` fallowed be any number of characters that aren't `'\'` up to the end. So this would return `false`: `path_contains_dir('/a/b/c', '/a/')` as would `path_contains_dir('/a/b/c', '/a/b')` (no terminating `'/'`). Is that the desired behaviour?

Generally, one should avoid inserting logic into unit tests because it can be difficult to distinguish a bug in the test from a bug in the code at times. (I know I suggested not using unrelated vim functions to ensure the behaviour of the one being tested, but if it can't be helped, it can't be helped.)