The after-unrar-check needs to take the "flat_unpack" option into account.
When sanitizing names, preserve "." and ".." elements in paths.

"sanitize_foldername()" was too eager to remove "." characters, thus removing "." and "..".
When using a single folder, the final "." element would be replaced with "unknown".
Merge remote-tracking branch 'upstream/0.7.x' into 0.7.x