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.
Good point about putting the assertions on their own lines.

About involving the nvim os module for some the tests: I am simply continuing the practice of the original unit test, although I also did worry about the issue of false positive or false negative. I tried to re-implement isdir() with lfs.attributes() but I couldn't see a way; lfs seems slightly deficient in getting the status of access modes, even though it is using stat underneath. I suggest we continue as is, and maybe rewrite later. As is, the file tests are no worse than before.