Fix to save path containing filenames

Detect a . in the filePath and if we find one, save at root instead
(Stops us saving at a path that's actually a file, eg |TEST|file.txt)