Create IsSnapshot function and add tests.

Moved into function for the sake of testing.
Dropped use of grep.
Merge branch 'is_snapshot' of https://github.com/Alexqw/zfSnap into Alexqw-is_snapshot