Modify/Optimize FileValidation class and fix FileValidationTest

The if statement in the validateFileType() function always failed for local file paths because calling getBytes() without an $extraBytes parameter always read bytes from $this->file, which is only a byte array if the original file path was a URL. We fix this by using $file to hold the byte array ($this->file is copied into $file in getBytes() if a URL was supplied) and use that to access byte values. The $extraBytes for loop in getBytes() was also fixed...it would (originally) always return only $extraBytes number of bytes because we didn't add the original 4 bytes before iteration. An insignificant change was the removal of the ternary statement on line 124. Since $extraBytes is always 0 if the parameter isn't provided, we can safely add 4 to it.