nit: sort of a double negative here. Would be better phrased as

var create = ['.', './', '..', '../', '/'].indexOf(dest) == -1;