javascript check if file exists at path