Ignore the .so files
LDFLAGS needs to be at the end to link
Use tuples instead of a single atom

Also add/fix some error handling