gen: check for `__unix__` instead of `__linux__`

	- Get rid of using `get_current_dir_name()` as this is Linux
	  specific, using `getcwd` instead.

Signed-off-by: Alberto Corona <alberto@0x1a.us>
platdef: change lin_def to unix_def

	- This might be completely useless...

Signed-off-by: Alberto Corona <alberto@0x1a.us>
gen: check for __unix__

	- This might make unix_def completely useless

Signed-off-by: Alberto Corona <alberto@0x1a.us>
parser: check for file extension

	- Fixed segfault when file did not have a file extension
	- Changed return on error for not having proper extension
	- Extensions might not be needed if parser opens file and checks
	  stream rather than checking for extension

Signed-off-by: Alberto Corona <alberto@0x1a.us>