IDE-1299

Notes:
1.add another check for . and .. invalid path