When looking into adding a test, I realized that the logic was inside of bin/prettier.js and therefore only applying to the cli. Moving it to index.js and adding a test so that it's more robust :)
* treat shebang outside of parsing
* use less costly indexOf and reuse format function
* avoid reprinting new line and potential double space at start
* move options back to format function
Although prettier lacks options to filter project files to format by itself, most shells allow to submit multiple files with a filename expansion. Add an example using bash.