As Trev said, you can turn off backup. I use Lazarus with Git, so, I can restore whatever I want and I don't need the backup feature from Lazarus.
About the "lib" directory, you can do just like me, setting the test directory as the output place for compiling. Take a look at the attachments.