Installing Aperture from the App Store when a previous version is installed
You will want to drag the following to trash and then quit and re-launch the Mac App Store:


/Library/Application Support/ProApps/Aperture System ID
/Applications/Aperture.app


If restarting the app store does not work, a reboot should clear any remnants of the older licensed Aperture product and let you install. Apple support is also very helpful if you need assistance removing an old serial number from a Mac. You don't have to necessarily tell them how you got the old serial number if you feel it may make them or you uncomfortable. I can't imagine a scenario where they wouldn't be delighted to assist you in procuring a legitimate license of the latest version of Aperture.

You can also use the mdfind command to search the entire hard drive for files with Aperture in them. Be prepared for a lot of files. I've never heard of people needing to delete all the Aperture directories, but you might also look to move these to trash as well:

~/Library/Preferences/com.apple.Aperture.plist 
~/Library/Caches/Aperture
~/Library/Application\ Support/Aperture