Added basename and pretty_basename options for permalinks