Fix detection of parent-relative paths in playlist saving

File or directory names containing ``..`` caused saved playlists to
contain absolute paths instead of relative paths even when the relative
path was "safe".  This changes the detection to be more strict.

Potentially related to #4463.
Merge pull request #4478 from alanbriolat/playlist-relative-paths

Fix detection of parent-relative paths in playlist saving