check if p is a proportion
Fix p>=0 if statement

Also allowed 0 and 1 because R will return \pm Inf rather than NaN
Merge pull request #3 from mdlerch/master

check if p is a proportion