Added checker for paths which works on both Windows and Linux