Update initGitbook.R

This removes this error for me:

```
Error in if (grepl("r knitsetup.+\n", lines)) { : 
argument is of length zero
```

Main changes are, first, `mdfiles2 <- gsub("\\.md$", ".Rmd", mdfiles)` using double backslash to escape the period, so we can rename `md` files to `Rmd`, and second, 

```
 toMatch <- c("r knitsetup", "r setup")
 matches <- grepl(paste(toMatch,collapse="|"), lines)  
    suppressWarnings(if (!any(matches)) {
```

So we get just one `TRUE` if there are any matches to either `r knitsetup` or `r setup` anywhere in the file (or a single `FALSE` if there is a match), and we can exclude the `references.Rmd` from this insertion.

Anyway, see if it doesn't break it for you. My details:

```
sessionInfo()
R version 3.0.3 (2014-03-06)
Platform: x86_64-w64-mingw32/x64 (64-bit)

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252   
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C                          
[5] LC_TIME=English_United States.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] knitr_1.5    Rgitbook_0.9

loaded via a namespace (and not attached):
 [1] bibtex_0.3-6        evaluate_0.5.3      formatR_0.10        httr_0.3           
 [5] knitcitations_0.5-0 RCurl_1.95-4.1      rmarkdown_0.1.4     stringr_0.6.2      
 [9] tools_3.0.3         XML_3.98-1.1        xtable_1.7-3  
```